package com.xiaoyao.novel.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.xiaoyao.novel.pojo.Book;
import com.xiaoyao.novel.pojo.Category;

public class CategoryDao extends BaseDao<Category> {

	@SuppressWarnings("unchecked")
	public List<Book> getCategoryBooks(int cateId) throws SQLException {
		return session.queryForList(PREFIX+"list",cateId);
	}

	public void updateBookCategory(Category category) throws SQLException { 
	session.update( PREFIX+"updateBookCategory", category)	;
	}

	public List<Book> listCount(Map<String, Object> map) throws SQLException {
		return session.queryForList(PREFIX + "listCount", map);
	}


}
